package com.longxi.tianjintianbao.ui.presenter.main;

import com.longxi.tianjintianbao.MyApplication;
import com.longxi.tianjintianbao.R;
import com.longxi.tianjintianbao.greedao.entity.User;
import com.longxi.tianjintianbao.ui.base.BaseActivity;
import com.longxi.tianjintianbao.ui.base.BasePresenter;
import com.longxi.tianjintianbao.ui.view.main.IPersonalDataAtView;
import com.longxi.tianjintianbao.utils.MyUtils;

public class PersonalDataAtPresenter extends BasePresenter<IPersonalDataAtView> {

    public PersonalDataAtPresenter(BaseActivity context) {
        super(context);
    }

    public void setBar() {
        mContext.setTitle("个人资料");
        mContext.setTvLeft(MyUtils.getString(R.string.home));
    }

    public void setUiData(){
        User user = MyApplication.loginUser;
        getView().getTvHead().setText("头像", "");
        getView().getTvUsername().setText("姓名", user.getUsername());
        getView().getTvPhone().setText("电话", user.getPhone());
        getView().getTvSex().setText("性别", user.getSex());
        getView().getTvBirth().setText("生日", user.getBirth());
    }

}
